package com.movie.act;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.LinearLayout;
import android.widget.TextView;

public class SettingAct extends BaseActivity {
	private TextView status_t = null;
	private CheckBox bound_c = null;
	private LinearLayout account_l = null;
	private LinearLayout sina_l = null;
	private LinearLayout myzone_l = null;
	private LinearLayout push_l = null;
	private LinearLayout share_l = null;
	private LinearLayout update_l = null;
	private LinearLayout about_l = null;

	private Context mContext = SettingAct.this;

	public void release() {
		status_t = null;
		bound_c = null;
		if (account_l != null) {
			account_l.removeAllViews();
			account_l = null;
		}
		if (sina_l != null) {
			sina_l.removeAllViews();
			sina_l = null;
		}
		if (myzone_l != null) {
			myzone_l.removeAllViews();
			myzone_l = null;
		}
		if (push_l != null) {
			push_l.removeAllViews();
			push_l = null;
		}
		if (share_l != null) {
			share_l.removeAllViews();
			share_l = null;
		}
		if (update_l != null) {
			update_l.removeAllViews();
			update_l = null;
		}
		if (about_l != null) {
			about_l.removeAllViews();
			about_l = null;
		}
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.settingact);
		// settingact
		findViewByIds();

		initBackTitleBar();
		account_l.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {
				Intent i = new Intent(mContext, UserLoginAct.class);
				mContext.startActivity(i);
			}
		});

		sina_l.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {

			}
		});

		myzone_l.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {
				Intent intent = new Intent(mContext, MyZoneAct.class);
				mContext.startActivity(intent);
			}
		});

		push_l.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {

			}
		});

		share_l.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {

			}
		});

		update_l.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {

			}
		});

		about_l.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {

			}
		});

		bound_c.setOnCheckedChangeListener(new OnCheckedChangeListener() {

			public void onCheckedChanged(CompoundButton buttonView,
					boolean isChecked) {

			}
		});

	}

	private void findViewByIds() {
		status_t = (TextView) findViewById(R.id.status_t);
		bound_c = (CheckBox) findViewById(R.id.bound_c);
		account_l = (LinearLayout) findViewById(R.id.account_l);
		sina_l = (LinearLayout) findViewById(R.id.sina_l);
		myzone_l = (LinearLayout) findViewById(R.id.myzone_l);
		push_l = (LinearLayout) findViewById(R.id.push_l);
		share_l = (LinearLayout) findViewById(R.id.share_l);
		update_l = (LinearLayout) findViewById(R.id.update_l);
		about_l = (LinearLayout) findViewById(R.id.about_l);
	}
}
